04. Pitfalls When Engineering Time Series Features
PRDTM2-785 AI Trading C2 L3 Vid4 (Pitfalls When) Engineering Time Series Features
Essential Tips for Feature Engineering in Time Series
Feature engineering in time series involves creativity but requires caution to avoid common mistakes. Here are some critical considerations to keep in mind:
Avoid Future Data:
- Never use data from the future when engineering features.
- Ensure calculations with present data, maintaining integrity and avoiding temporal leakage.
Timing and Data Availability:
- Utilize data available during the stated timeframe, respecting its release schedule.
- Assign data to dates when it's released, not the period it represents.
Handle Missing Data Carefully:
- Drop observations that produce nulls, especially when using rolling averages.
- Be cautious with initial data periods; they may lack sufficient data for calculations.
Ordinality in Categorical Data:
- Understand if categories impose order; apply numerical values properly.
- Avoid assuming order in inherently unordered categories, like months.
Validation Technique:
- Double-check engineered features by removing recent data and attempting feature recreation.
- Ensure feature creation is independent of future data.
Adhering to these guidelines ensures sound and valid feature engineering practices.